Skip to content

Commit e3fe37b

Browse files
committed
style: adjust max-line-length between flake8 and pylint to be the same
1 parent 712b368 commit e3fe37b

File tree

5 files changed

+19
-10
lines changed

5 files changed

+19
-10
lines changed

.flake8

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[pycodestyle]
2-
max-line-length = 120
2+
max-line-length = 100
33

44
[flake8]
5-
max-line-length = 120
5+
max-line-length = 100
66
ignore = E116,W503,W504,N802,N806
77
;exclude=argparse.py

pikaur/install_info_fetcher.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ def get_all_packages_info(self) -> None:
222222

223223
self.mark_dependent()
224224

225-
def _get_repo_pkgs_info( # pylint: disable=too-many-statements,too-many-locals,too-many-branches
225+
# pylint: disable=too-many-statements,too-many-locals,too-many-branches
226+
def _get_repo_pkgs_info(
226227
self, pkg_lines: list[str], extra_args: list[str] | None = None
227228
) -> list[RepoInstallInfo]:
228229
if not pkg_lines:
@@ -431,7 +432,9 @@ def get_repo_deps_info(self) -> None:
431432
else:
432433
self.new_thirdparty_repo_deps_install_info.append(dep_install_info)
433434

434-
def get_aur_pkgs_info(self, aur_packages_versionmatchers: list[str]) -> None: # pylint: disable=too-many-branches
435+
def get_aur_pkgs_info( # pylint: disable=too-many-branches
436+
self, aur_packages_versionmatchers: list[str]
437+
) -> None:
435438
aur_packages_names_to_versions = {
436439
strip_aur_repo_name(version_matcher.pkg_name): version_matcher
437440
for version_matcher in [VersionMatcher(name) for name in aur_packages_versionmatchers]

pikaur/makepkg_config.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,16 @@ def get_config(cls, config_path: str | None = None) -> ConfigFormat:
5757
cls._cached_config = {}
5858
if not cls._cached_config.get(config_path):
5959
with open_file(config_path) as config_file:
60-
cls._cached_config[config_path] = { # pylint: disable=unsupported-assignment-operation
60+
# pylint: disable=unsupported-assignment-operation
61+
cls._cached_config[config_path] = {
6162
key: value
6263
for key, value in [
6364
cls._parse_line(line)
6465
for line in config_file.readlines()
6566
] if key
6667
}
67-
return cls._cached_config[config_path] # pylint: disable=unsubscriptable-object
68+
# pylint: disable=unsubscriptable-object
69+
return cls._cached_config[config_path]
6870

6971
@classmethod
7072
def get(cls, key: str, fallback: Any = None, config_path: str | None = None) -> Any:

pikaur/print_department.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ def _bold_line(line: str) -> str:
141141

142142
type_sort_key = tuple | str
143143

144-
def pretty_format(pkg_update: 'InstallInfo') -> tuple[str, type_sort_key]: # pylint:disable=too-many-locals,R0912
144+
def pretty_format( # pylint:disable=too-many-locals,R0912
145+
pkg_update: 'InstallInfo'
146+
) -> tuple[str, type_sort_key]:
145147
common_version, diff_weight = get_common_version(
146148
pkg_update.current_version or '', pkg_update.new_version or ''
147149
)
@@ -648,8 +650,8 @@ def print_ignoring_outofdate_upgrade(package_info: InstallInfo) -> None:
648650
)
649651

650652

651-
# @TODO: weird pylint behavior if remove `return` from the end:
652-
def print_package_search_results( # pylint:disable=too-many-locals,too-many-statements,too-many-branches
653+
# pylint:disable=too-many-locals,too-many-statements,too-many-branches
654+
def print_package_search_results(
653655
repo_packages: Iterable[pyalpm.Package],
654656
aur_packages: Iterable[AURPackageInfo],
655657
local_pkgs_versions: dict[str, str],

pikaur/search_cli.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ def join_search_results(
127127
}.values()
128128

129129

130-
def cli_search_packages(enumerated: bool = False) -> list[AnyPackage]: # pylint: disable=too-many-locals
130+
def cli_search_packages( # pylint: disable=too-many-locals
131+
enumerated: bool = False
132+
) -> list[AnyPackage]:
131133
refresh_pkg_db_if_needed()
132134

133135
args = parse_args()

0 commit comments

Comments
 (0)