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 Linter Failing for python_utils

See original GitHub issue

Describe the bug While running pre_commit_linter.py for just python_utils.py it fails with the error AttributeError: 'list' object has no attribute 'trimmed_messages'

To Reproduce Steps to reproduce the behavior:

  1. Run the command python -m scripts.linters.pre_commit_linter --files python_utils.py

Observed behavior An error is thrown AttributeError: 'list' object has no attribute 'trimmed_messages'

Expected behavior It should run without errors

Screenshots Screenshot 2021-04-07 at 5 15 49 PM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DubeySandeepcommented, Oct 9, 2021

Hi @SanjaySajuJacob Thanks for looking into this, it looks like the function is removed now after the py3 migration. I agree that this issue can be closed now!

0reactions
SanjaySajuJacobcommented, Oct 9, 2021

Hi @aasiffaizal, I tried replicating the behavior described by the issue by running python -m scripts.linters.pre_commit_linter --files core/python_utils.py and it seems to have passed all checks. Since this issue does not occur anymore, can it be closed? Thanks

issue ss

Read more comments on GitHub >

github_iconTop Results From Across the Web

hooks: pylint: pre-commit failure #4145 - iterative/dvc - GitHub
pre -commit-config.yaml states that the pylint hook is defined locally, yet .pre-commit-hooks.yaml fails to define it.
Read more >
pylint precommit - only fail on specific categories (errors/fatals ...
My objective: I want pylint (in combination with pre-commit hooks) not to fail with warnings of the category C,R,W, but on E,F (Errors...
Read more >
Running Python Linters with Pre-commit Hooks
Pre -commit hooks can be a neat way to run automated ad-hoc tasks before submitting a new git commit. These tasks may include...
Read more >
Supported hooks - pre-commit
cheetah-reorder-imports - This hook reorders imports in cheetah files. cheetah-flake - Lint cheetah code using flake8 and some other checks.
Read more >
Stop your builds failing with git pre commit hooks | PreviousNext
Depending on how the build is configured, failing coding standards can result in the entire build failing. Because linting is generally not ...
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