Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run black on inotify #1015

Merged
merged 4 commits into from
Oct 10, 2023
Merged

Conversation

msabramo
Copy link
Contributor

@msabramo msabramo commented Oct 10, 2023

Run black on src/watchdog/observers/inotify.py. Fixes failing flake8 tests (like this one):

Before:

(.venv)
abramowi at Marcs-MacBook-Pro-3 in ~/Code/OpenSource/watchdog (master●)
$ python -m tox -e flake8
flake8: install_deps> python -I -m pip install -r requirements-tests.txt
.pkg: _optional_hooks> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_editable> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_editable> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
flake8: install_package_deps> python -I -m pip install 'PyYAML>=3.10'
flake8: install_package> python -I -m pip install --force-reinstall --no-deps /Users/abramowi/Code/OpenSource/watchdog/.tox/.tmp/package/12/watchdog-3.0.1-0.editable-cp310-cp310-macosx_12_0_arm64.whl
flake8: commands[0]> python -m flake8 docs tools src tests setup.py
src/watchdog/observers/inotify.py:224:86: W504 line break after binary operator
src/watchdog/observers/inotify.py:225:88: W504 line break after binary operator
flake8: exit 1 (0.40 seconds) /Users/abramowi/Code/OpenSource/watchdog> python -m flake8 docs tools src tests setup.py pid=76654
.pkg: _exit> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  flake8: FAIL code 1 (9.23=setup[8.83]+cmd[0.40] seconds)
  evaluation failed :( (10.10 seconds)

After:

(.venv)
abramowi at Marcs-MacBook-Pro-3 in ~/Code/OpenSource/watchdog (master●)
$ python -m tox -e flake8
.pkg: _optional_hooks> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_editable> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_editable> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
flake8: install_package> python -I -m pip install --force-reinstall --no-deps /Users/abramowi/Code/OpenSource/watchdog/.tox/.tmp/package/13/watchdog-3.0.1-0.editable-cp310-cp310-macosx_12_0_arm64.whl
flake8: commands[0]> python -m flake8 docs tools src tests setup.py
.pkg: _exit> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  flake8: OK (1.59=setup[1.11]+cmd[0.48] seconds)
  congratulations :) (2.45 seconds)

msabramo and others added 2 commits October 10, 2023 09:09
Run `black` on `src/watchdog/observers/inotify.py`. Fixes failing
`flake8` tests:

Before:
-------

```
(.venv)
abramowi at Marcs-MacBook-Pro-3 in ~/Code/OpenSource/watchdog (master●)
$ python -m tox -e flake8
flake8: install_deps> python -I -m pip install -r requirements-tests.txt
.pkg: _optional_hooks> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_editable> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_editable> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
flake8: install_package_deps> python -I -m pip install 'PyYAML>=3.10'
flake8: install_package> python -I -m pip install --force-reinstall --no-deps /Users/abramowi/Code/OpenSource/watchdog/.tox/.tmp/package/12/watchdog-3.0.1-0.editable-cp310-cp310-macosx_12_0_arm64.whl
flake8: commands[0]> python -m flake8 docs tools src tests setup.py
src/watchdog/observers/inotify.py:224:86: W504 line break after binary operator
src/watchdog/observers/inotify.py:225:88: W504 line break after binary operator
flake8: exit 1 (0.40 seconds) /Users/abramowi/Code/OpenSource/watchdog> python -m flake8 docs tools src tests setup.py pid=76654
.pkg: _exit> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  flake8: FAIL code 1 (9.23=setup[8.83]+cmd[0.40] seconds)
  evaluation failed :( (10.10 seconds)
```

After:
------

```
(.venv)
abramowi at Marcs-MacBook-Pro-3 in ~/Code/OpenSource/watchdog (master●)
$ python -m tox -e flake8
.pkg: _optional_hooks> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_editable> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_editable> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
flake8: install_package> python -I -m pip install --force-reinstall --no-deps /Users/abramowi/Code/OpenSource/watchdog/.tox/.tmp/package/13/watchdog-3.0.1-0.editable-cp310-cp310-macosx_12_0_arm64.whl
flake8: commands[0]> python -m flake8 docs tools src tests setup.py
.pkg: _exit> python /Users/abramowi/Code/OpenSource/watchdog/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  flake8: OK (1.59=setup[1.11]+cmd[0.48] seconds)
  congratulations :) (2.45 seconds)
```
@BoboTiG
Copy link
Collaborator

BoboTiG commented Oct 10, 2023

I added black + isort configurations. Would you mind running black again 🙏🏻 ?

@msabramo
Copy link
Contributor Author

I added black + isort configurations. Would you mind running black again 🙏🏻 ?

Of course! See 753c717.

@msabramo
Copy link
Contributor Author

and ran isort in 9963a77.

@BoboTiG BoboTiG merged commit e4e2f8e into gorakhargosh:master Oct 10, 2023
42 of 45 checks passed
@BoboTiG
Copy link
Collaborator

BoboTiG commented Oct 10, 2023

Thank you @msabramo !

@msabramo msabramo deleted the run-black-on-inotify branch October 10, 2023 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants