mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-30 18:26:53 +00:00
fixed formatting issues
This commit is contained in:
parent
df46f71980
commit
cd47a0867e
2 changed files with 25 additions and 5 deletions
|
|
@ -60,7 +60,10 @@ class Requirement:
|
|||
)
|
||||
|
||||
def contains_version_specifier(self) -> bool:
|
||||
return bool(self.VERSION_SPECIFIED.match(self.value))
|
||||
return (
|
||||
self.value is not None and
|
||||
bool(self.VERSION_SPECIFIED.match(self.value))
|
||||
)
|
||||
|
||||
def append_value(self, value: bytes) -> None:
|
||||
if self.value is not None:
|
||||
|
|
@ -171,7 +174,9 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|||
|
||||
for arg in args.filenames:
|
||||
with open(arg, 'rb+') as file_obj:
|
||||
ret_for_file = fix_requirements(file_obj, args.fail_without_version)
|
||||
ret_for_file = fix_requirements(
|
||||
file_obj, args.fail_without_version,
|
||||
)
|
||||
|
||||
if ret_for_file:
|
||||
print(f'Error in file {arg}')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue