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

No module named path_to_file=.pylintrc #11

Open
denists1984 opened this issue Jun 11, 2020 · 2 comments
Open

No module named path_to_file=.pylintrc #11

denists1984 opened this issue Jun 11, 2020 · 2 comments

Comments

@denists1984
Copy link

denists1984 commented Jun 11, 2020

HI All

After upgrading to new v0.6.0 im getting error but code rate is 10.00/10:
`#####
************* Module –rcfile
rcfile:1:0: F0001: No module named –rcfile (fatal)
************* Module path_to_file=.pylintrc
path_to_file=.pylintrc:1:0: F0001: No module named path_to_file=.pylintrc (fatal)

############################
Your code has been rated at 10.00/10`

It wasn't happened in v0.5.4:
`./tests/run_code_quality_test.sh
Installing collected packages: scripts
Found existing installation: scripts 0.0.0
Uninstalling scripts-0.0.0:
Successfully uninstalled scripts-0.0.0
Running setup.py develop for scripts
Successfully installed scripts
pylint 2.4.3
astroid 2.3.3
Python 3.7.4 (default, Aug 21 2019, 00:19:59)
[GCC 8.3.0]
pylint_runner (0.5.4) for Python 3.7.4
Using pylint 2.4.3 for python 3.7.4
pylint running on the following files:

my_script.py
#############################
Your code has been rated at 10.00/10
`

v0.6.0:
`./tests/run_code_quality_test.sh
Installing collected packages: scripts
Found existing installation: scripts 0.0.0
Uninstalling scripts-0.0.0:
Successfully uninstalled scripts-0.0.0
Running setup.py develop for scripts
Successfully installed scripts.
pylint 2.4.3
astroid 2.3.3
Python 3.7.4 (default, Aug 21 2019, 00:19:59)
[GCC 8.3.0]
pylint_runner (0.6.0) for Python 3.7.4
Using pylint 2.4.3 for python 3.7.4
pylint running on the following files:
my_script.py
######################
************* Module –rcfile
rcfile:1:0: F0001: No module named –rcfile (fatal)
************* Module path_to_file=.pylintrc
path_to_file=.pylintrc:1:0: F0001: No module named path_to_file=.pylintrc (fatal)

############################
Your code has been rated at 10.00/10`

Command executed:
docker run -i --rm --name code_quality_python \ -v "$PWD":"$PWD" \ -w "$PWD" \ my_python3_container:latest \ -c "pip3 install -e .; pylint --version; pylint_runner --version; pylint_runner –rcfile path_to_file=.pylintrc -v "

.pylintrc file wan't changed since using v0.5.4

Please advice
Thanks in advance

@MasterOdin
Copy link
Owner

This is happening as 0.6.0 now passes unused arguments down to pylint. You've got a typo in the use of the --rcfile option where:

  1. You're missing a hyphen to the option (-rcfile vs --rcfile)
  2. The argument to that you be just .pylintrc, not path_to_file=.pylintrc (path_to_file is a placeholder in the docs).

So, correcting your command with above:

docker run -i --rm --name code_quality_python \
-v "$PWD":"$PWD" \
-w "$PWD" \
my_python3_container:latest \
-c "pip3 install -e .; pylint --version; pylint_runner --version; pylint_runner --rcfile .pylintrc -v "

Additionally, if just using .pylintrc in the current working directory, you can omit the --rcfile directive and it will use it by default.

and so should be the same as:

docker run -i --rm --name code_quality_python \
-v "$PWD":"$PWD" \
-w "$PWD" \
my_python3_container:latest \
-c "pip3 install -e .; pylint --version; pylint_runner --version; pylint_runner -v "

@denists1984
Copy link
Author

Thank you.
Just removed the --rcfile .pylintrc from the command.
Works fine now

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

No branches or pull requests

2 participants