Skip to content

Commit 8f83747

Browse files
authored
Update development dependencies, remove unnecessary noqa rules (#54)
This: - updates all the development dependencies to latest versions - removes the overrides for `unused argument` flake8 warnings, since the latest version of `flake8-unused-arguments` supports ignoring those with a config 🎉
1 parent fd0566e commit 8f83747

File tree

6 files changed

+38
-37
lines changed

6 files changed

+38
-37
lines changed

.flake8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ ignore =
2020
D409
2121
D413
2222
U101
23-
ignore-decorators = _make_async_docs
23+
unused-arguments-ignore-overload-functions = True
24+
unused-arguments-ignore-stub-functions = True
2425
per-file-ignores =
2526
docs/*: D
2627
scripts/*: D

setup.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,36 +59,36 @@
5959
'websockets ~= 10.4',
6060
'aiofiles ~= 22.1.0',
6161
'aioshutil ~= 1.2',
62-
'cryptography ~= 39.0.0',
62+
'cryptography ~= 39.0.1',
6363
],
6464
extras_require={
6565
'dev': [
66-
'autopep8 ~= 2.0.0',
66+
'autopep8 ~= 2.0.1',
6767
'filelock ~= 3.9.0',
68-
'flake8 ~= 5.0.4',
69-
'flake8-bugbear ~= 22.10.27',
68+
'flake8 ~= 6.0.0',
69+
'flake8-bugbear ~= 23.1.20',
7070
'flake8-commas ~= 2.1.0',
71-
'flake8-docstrings ~= 1.6.0',
72-
'flake8-isort ~= 5.0.3',
71+
'flake8-docstrings ~= 1.7.0',
72+
'flake8-isort ~= 6.0.0',
7373
'flake8-quotes ~= 3.3.1',
74-
'flake8-unused-arguments ~= 0.0.12',
75-
'isort ~= 5.10.1',
76-
'mypy ~= 0.991',
74+
'flake8-unused-arguments ~= 0.0.13', # TODO: remove overload noqa
75+
'isort ~= 5.12.0',
76+
'mypy ~= 1.0.0',
7777
'pep8-naming ~= 0.13.2',
78-
'pre-commit ~= 2.20.0',
78+
'pre-commit ~= 3.0.1',
7979
'pytest ~= 7.2.0',
8080
'pytest-asyncio ~= 0.20.3',
8181
'pytest-only ~= 2.0.0',
8282
'pytest-randomly ~= 3.12.0',
8383
'pytest-timeout ~= 2.1.0',
84-
'pytest-xdist ~= 3.1.0',
84+
'pytest-xdist ~= 3.2.0',
8585
'respx ~= 0.20.1',
86-
'sphinx ~= 5.3.0',
87-
'sphinx-autodoc-typehints ~= 1.19.5',
86+
'sphinx ~= 6.1.3',
87+
'sphinx-autodoc-typehints ~= 1.22',
8888
'sphinx-markdown-builder == 0.5.4', # pinned to 0.5.4, because 0.5.5 has a formatting bug
8989
'types-aiofiles ~= 22.1.0.4',
9090
'types-psutil ~= 5.9.5.5',
91-
'types-setuptools ~= 65.6.0.1',
91+
'types-setuptools', # always latest, since we always install latest setuptools
9292
],
9393
},
9494
)

src/apify/_utils.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,57 +96,57 @@ def _maybe_extract_enum_member_value(maybe_enum_member: Any) -> Any:
9696

9797

9898
@overload
99-
def _fetch_and_parse_env_var(env_var: _BOOL_ENV_VARS_TYPE) -> Optional[bool]: # noqa: U100
99+
def _fetch_and_parse_env_var(env_var: _BOOL_ENV_VARS_TYPE) -> Optional[bool]:
100100
...
101101

102102

103103
@overload
104-
def _fetch_and_parse_env_var(env_var: _BOOL_ENV_VARS_TYPE, default: bool) -> bool: # noqa: U100
104+
def _fetch_and_parse_env_var(env_var: _BOOL_ENV_VARS_TYPE, default: bool) -> bool:
105105
...
106106

107107

108108
@overload
109-
def _fetch_and_parse_env_var(env_var: _DATETIME_ENV_VARS_TYPE) -> Optional[Union[datetime, str]]: # noqa: U100
109+
def _fetch_and_parse_env_var(env_var: _DATETIME_ENV_VARS_TYPE) -> Optional[Union[datetime, str]]:
110110
...
111111

112112

113113
@overload
114-
def _fetch_and_parse_env_var(env_var: _DATETIME_ENV_VARS_TYPE, default: datetime) -> Union[datetime, str]: # noqa: U100
114+
def _fetch_and_parse_env_var(env_var: _DATETIME_ENV_VARS_TYPE, default: datetime) -> Union[datetime, str]:
115115
...
116116

117117

118118
@overload
119-
def _fetch_and_parse_env_var(env_var: _FLOAT_ENV_VARS_TYPE) -> Optional[float]: # noqa: U100
119+
def _fetch_and_parse_env_var(env_var: _FLOAT_ENV_VARS_TYPE) -> Optional[float]:
120120
...
121121

122122

123123
@overload
124-
def _fetch_and_parse_env_var(env_var: _FLOAT_ENV_VARS_TYPE, default: float) -> float: # noqa: U100
124+
def _fetch_and_parse_env_var(env_var: _FLOAT_ENV_VARS_TYPE, default: float) -> float:
125125
...
126126

127127

128128
@overload
129-
def _fetch_and_parse_env_var(env_var: _INTEGER_ENV_VARS_TYPE) -> Optional[int]: # noqa: U100
129+
def _fetch_and_parse_env_var(env_var: _INTEGER_ENV_VARS_TYPE) -> Optional[int]:
130130
...
131131

132132

133133
@overload
134-
def _fetch_and_parse_env_var(env_var: _INTEGER_ENV_VARS_TYPE, default: int) -> int: # noqa: U100
134+
def _fetch_and_parse_env_var(env_var: _INTEGER_ENV_VARS_TYPE, default: int) -> int:
135135
...
136136

137137

138138
@overload
139-
def _fetch_and_parse_env_var(env_var: _STRING_ENV_VARS_TYPE, default: str) -> str: # noqa: U100
139+
def _fetch_and_parse_env_var(env_var: _STRING_ENV_VARS_TYPE, default: str) -> str:
140140
...
141141

142142

143143
@overload
144-
def _fetch_and_parse_env_var(env_var: _STRING_ENV_VARS_TYPE) -> Optional[str]: # noqa: U100
144+
def _fetch_and_parse_env_var(env_var: _STRING_ENV_VARS_TYPE) -> Optional[str]:
145145
...
146146

147147

148148
@overload
149-
def _fetch_and_parse_env_var(env_var: ApifyEnvVars) -> Optional[Any]: # noqa: U100
149+
def _fetch_and_parse_env_var(env_var: ApifyEnvVars) -> Optional[Any]:
150150
...
151151

152152

@@ -402,12 +402,12 @@ def _is_running_in_ipython() -> bool:
402402

403403

404404
@overload
405-
def _budget_ow(value: Union[str, int, float, bool], predicate: Tuple[Type, bool], value_name: str) -> None: # noqa: U100
405+
def _budget_ow(value: Union[str, int, float, bool], predicate: Tuple[Type, bool], value_name: str) -> None:
406406
...
407407

408408

409409
@overload
410-
def _budget_ow(value: Dict, predicate: Dict[str, Tuple[Type, bool]]) -> None: # noqa: U100
410+
def _budget_ow(value: Dict, predicate: Dict[str, Tuple[Type, bool]]) -> None:
411411
...
412412

413413

src/apify/storages/key_value_store.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,17 @@ def _get_default_name(cls, config: Configuration) -> str:
8181

8282
@overload
8383
@classmethod
84-
async def get_value(cls, key: str) -> Any: # noqa: U100
84+
async def get_value(cls, key: str) -> Any:
8585
...
8686

8787
@overload
8888
@classmethod
89-
async def get_value(cls, key: str, default_value: T) -> T: # noqa: U100
89+
async def get_value(cls, key: str, default_value: T) -> T:
9090
...
9191

9292
@overload
9393
@classmethod
94-
async def get_value(cls, key: str, default_value: Optional[T] = None) -> Optional[T]: # noqa: U100
94+
async def get_value(cls, key: str, default_value: Optional[T] = None) -> Optional[T]:
9595
...
9696

9797
@classmethod

src/apify/storages/storage_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ class Storage(Protocol[T]):
1818
"""A protocol defining common interface for storage classes."""
1919

2020
@classmethod
21-
def _create_instance(cls, storage_id_or_name: str, client: Union[ApifyClientAsync, MemoryStorage]) -> T: # noqa: U100
21+
def _create_instance(cls, storage_id_or_name: str, client: Union[ApifyClientAsync, MemoryStorage]) -> T:
2222
...
2323

2424
@classmethod
25-
def _get_default_name(cls, config: Configuration) -> str: # noqa: U100
25+
def _get_default_name(cls, config: Configuration) -> str:
2626
...
2727

2828

tests/integration/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ def actor_base_source_files(sdk_wheel_path: Path) -> Dict[str, Union[str, bytes]
108108
class ActorFactory(Protocol):
109109
def __call__(
110110
self,
111-
actor_label: str, # noqa: U100
111+
actor_label: str,
112112
*,
113-
main_func: Optional[Callable] = None, # noqa: U100
114-
main_py: Optional[str] = None, # noqa: U100
115-
source_files: Optional[Mapping[str, Union[str, bytes]]] = None, # noqa: U100
113+
main_func: Optional[Callable] = None,
114+
main_py: Optional[str] = None,
115+
source_files: Optional[Mapping[str, Union[str, bytes]]] = None,
116116
) -> Awaitable[ActorClientAsync]:
117117
...
118118

0 commit comments

Comments
 (0)