question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pre-commit might install flake8 unpinned?

See original GitHub issue

I’m seeing the same version of code pass or fail flake8 checks on different machines. All use the same version of code, same .pre-commit-config.yaml, same version of pre-commit (v1.0.0), and have pinned the same version of flake8 (3.4.1). Some pass flake8 checks, some correctly find an E722:

Tests should end in _test.py.............................................Passed
Flake8...................................................................Failed
hookid: flake8

testing/factories/base_factory.py:123:5: E722 do not use bare except'

@chriskuehl and I think we’ve traced it to pre-commit installing flake8 unpinned on its first attempt, and not updating it later.

Is that enough to work with, or should I try to find more concrete repro steps?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mittonkcommented, Oct 26, 2017

Great, that gives me some good options.

1reaction
asottilecommented, Oct 26, 2017

Or build a mirror for flake8 using pre-commit-mirror-maker – though there’s some outstanding issues until it uses the new types.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Version Control Hooks — flake8 6.0.0 documentation
Flake8 can be included as a hook for pre-commit. The easiest way to get started is to add this configuration to your .pre-commit-config.yaml...
Read more >
pre-commit
Run pre-commit install to install pre-commit into your git hooks. pre-commit will now run on every commit. Every time you clone a project...
Read more >
Hypermodern Python Chapter 3: Linting - Claudio Jolowicz
In this chapter, we use Flake8 and pre-commit. Add a Nox session to run Flake8 on your codebase: # noxfile.py locations = "src",...
Read more >
Thoughts on where tools fit into a workflow
Another option is you can also set up pre-commit so as to not forget and get the ... One is to leave the...
Read more >
Pre-commit suddenly fails to install Flake8 - Stack Overflow
The Flake8 project has moved to GitHub and requires updating the repository URL in the pre-commit configuration file:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found