Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

[securedrop-proxy] black in dev env and CI #144

Closed
redshiftzero opened this issue Jan 10, 2020 · 0 comments · Fixed by #61
Closed

[securedrop-proxy] black in dev env and CI #144

redshiftzero opened this issue Jan 10, 2020 · 0 comments · Fixed by #61
Assignees

Comments

@redshiftzero
Copy link
Contributor

In #55 we ran black on the codebase. Let's:

  1. Add black as a dev requirement
  2. Run it as part of our lint target
  3. Run black --check (such that a build fails if black would reformat our code) somewhere in CI before the lint target runs (since if changes are needed make lint would reformat the code) - if you have a better idea here feel free to implement it
@kushaldas kushaldas self-assigned this Jan 16, 2020
kushaldas referenced this issue Jan 17, 2020
To have latest black, we need updated typed-ast,
for that we have to upgrade mypy too, and for mypy
upgrade to work, we had to upgrade the mypy-extensions.

Now the lint target as the black target as dependency
in the Makefile.
kushaldas referenced this issue Jan 20, 2020
To have latest black, we need updated typed-ast,
for that we have to upgrade mypy too, and for mypy
upgrade to work, we had to upgrade the mypy-extensions.

Now the lint target as the black target as dependency
in the Makefile.

setup.py marks Python version as >= 3.7 as we are testing
and running the code only on 3.7 on Debian Buster.
kushaldas referenced this issue Jan 20, 2020
To have latest black, we need updated typed-ast,
for that we have to upgrade mypy too, and for mypy
upgrade to work, we had to upgrade the mypy-extensions.

Now the lint target as the black target as dependency
in the Makefile.

setup.py marks Python version as >= 3.7 as we are testing
and running the code only on 3.7 on Debian Buster.

Also contains the formatting change in proxy.py for black
check to run sucessfully on CI.
kushaldas referenced this issue Jan 23, 2020
To have latest black, we need updated typed-ast,
for that we have to upgrade mypy too, and for mypy
upgrade to work, we had to upgrade the mypy-extensions.

It has pyproject.toml to mark line length as 100.
Now the lint target as the black target as dependency
in the Makefile.

setup.py marks Python version as >= 3.7 as we are testing
and running the code only on 3.7 on Debian Buster.

Also contains the formatting change in proxy.py for black
check to run sucessfully on CI.
kushaldas referenced this issue Jan 23, 2020
To have latest black, we need updated typed-ast,
for that we have to upgrade mypy too, and for mypy
upgrade to work, we had to upgrade the mypy-extensions.

It also has a flake8 config to mark line legth to 88.
Now the lint target as the black target as dependency
in the Makefile.

setup.py marks Python version as >= 3.7 as we are testing
and running the code only on 3.7 on Debian Buster.

Also contains the formatting change in proxy.py for black
check to run sucessfully on CI.
kushaldas referenced this issue Jan 23, 2020
To have latest black, we need updated typed-ast,
for that we have to upgrade mypy too, and for mypy
upgrade to work, we had to upgrade the mypy-extensions.

It also has a flake8 config to mark line legth to 88.
Now the lint target as the black target as dependency
in the Makefile.

setup.py marks Python version as >= 3.7 as we are testing
and running the code only on 3.7 on Debian Buster.

Also contains the formatting change in proxy.py for black
check to run sucessfully on CI.
kushaldas referenced this issue Jan 23, 2020
To have latest black, we need updated typed-ast,
for that we have to upgrade mypy too, and for mypy
upgrade to work, we had to upgrade the mypy-extensions.

It also has a flake8 config to mark line legth to 88.
Now the lint target as the black target as dependency
in the Makefile.

setup.py marks Python version as >= 3.7 as we are testing
and running the code only on 3.7 on Debian Buster.

Also contains the formatting change in proxy.py for black
check to run sucessfully on CI.
kushaldas referenced this issue Jun 4, 2020
To have latest black, we need updated typed-ast,
for that we have to upgrade mypy too, and for mypy
upgrade to work, we had to upgrade the mypy-extensions.

It first runs isort to check if it passes, and then
it runs black. Both uses 100 as line length.

setup.py marks Python version as >= 3.7 as we are testing
and running the code only on 3.7 on Debian Buster.

Also contains the formatting change in proxy.py for black
check to run sucessfully on CI.
@rmol rmol closed this as completed in #61 Jun 4, 2020
rmol referenced this issue Jun 4, 2020
…_dev

Fixes #57 runs black & isor for code formatting check
@zenmonkeykstop zenmonkeykstop changed the title black in dev env and CI [securedrop-proxy] black in dev env and CI Dec 13, 2023
@zenmonkeykstop zenmonkeykstop transferred this issue from freedomofpress/securedrop-proxy Dec 13, 2023
@zenmonkeykstop zenmonkeykstop transferred this issue from freedomofpress/securedrop-client Dec 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants