Skip to content

Commit

Permalink
Address flake8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sosna committed May 3, 2024
1 parent 935301d commit 0225e32
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/pysdmx/fmr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ def __fetch(self, url: str, is_ref_meta: bool = False) -> bytes:
try:
if is_ref_meta and self.format == Format.SDMX_JSON:
h = self.headers.copy()
h["Accept"] = (
"application/vnd.sdmx.metadata+json;version=2.0.0"
)
h[
"Accept"
] = "application/vnd.sdmx.metadata+json;version=2.0.0"
else:
h = self.headers
r = client.get(url, headers=h)
Expand Down Expand Up @@ -556,9 +556,9 @@ async def __fetch(self, url: str, is_ref_meta: bool = False) -> bytes:
try:
if is_ref_meta and self.format == Format.SDMX_JSON:
h = self.headers.copy()
h["Accept"] = (
"application/vnd.sdmx.metadata+json;version=2.0.0"
)
h[
"Accept"
] = "application/vnd.sdmx.metadata+json;version=2.0.0"
else:
h = self.headers
r = await client.get(url, headers=h)
Expand Down
2 changes: 1 addition & 1 deletion src/pysdmx/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from pysdmx.model.__base import (
Agency,
Contact,
DataflowRef,
DataConsumer,
DataflowRef,
DataProvider,
Organisation,
)
Expand Down
3 changes: 1 addition & 2 deletions src/pysdmx/model/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

from typing import Iterator, List, Optional, Sequence, Set

from pysdmx.model.__base import Item, ItemScheme
from pysdmx.model import DataflowRef
from pysdmx.model.__base import DataflowRef, Item, ItemScheme


class Category(Item, frozen=False, omit_defaults=True): # type: ignore[misc]
Expand Down
2 changes: 1 addition & 1 deletion src/pysdmx/model/dataflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

from msgspec import Struct

from pysdmx.model.__base import Agency, DataProvider
from pysdmx.model.code import Codelist, Hierarchy
from pysdmx.model.concept import DataType, Facets
from pysdmx.model import Agency, DataProvider


class Role(str, Enum):
Expand Down
4 changes: 3 additions & 1 deletion src/pysdmx/model/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,9 @@ def __len__(self) -> int:
"""Return the number of mapping rules in the structure map."""
return len(self.maps)

def __getitem__(self, id_: str) -> Optional[
def __getitem__(
self, id_: str
) -> Optional[
Sequence[
Union[
ComponentMap,
Expand Down
2 changes: 1 addition & 1 deletion tests/model/test_category_scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import pytest

from pysdmx.model.__base import DataflowRef
from pysdmx.model.category import Category, CategoryScheme
from pysdmx.model import DataflowRef


@pytest.fixture()
Expand Down

0 comments on commit 0225e32

Please sign in to comment.