Code Monkey home page Code Monkey logo

mining-data-science-repositories's People

Contributors

akshatbajaj avatar anjsimmo avatar nikhii avatar scottyb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mining-data-science-repositories's Issues

Exit status of Pylint subprocess not checked

task_analyse_pylint executes Pylint as a subprocess and checks stderr for errors. However, if Pylint fails in an unexpected way (e.g. the task is killed) the stderr may be empty, thus causing the script to incorrectly assume Pylint completed successfully.

We should check the process exit status as an additional safegaurd against the possibility of missing warnings (a threat to the internal validity of the study).

hi sir

hi sir, i prepare a study (master degree) ((deep reinforcement learning approach based on dynamic path planning for mobile robot)
and i found research close to my study
https://github.com/dranaju/project
Due to i am new in programming i couldn't run the code there were some error as you could see in attached file, sir could you help me with that (run the code) it will be a great favor.
1

Pylint will use repo modules on PATH rather than its own

Expected Behaviour:

  • Pylint should never execute code within repo under analysis (as this could affect the analysis, or potentially even do something malicious)

Actual behaviour:

  • When Pylint is run in root of a repo, modules in the repo will sometimes be loaded instead of Pylint's own imports! This usually causes Pylint to crash (but could potentially do anything).

Example:

  • Root of project 39565135 contains a file called appdirs.py. When a Pylint dependency tries to import the appdir package, it mistakenly imports the local appdirs.py file instead.
INFO:root:../input/39565135
ERROR:root:['Traceback (most recent call last):', '  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main', '    "__main__", mod_spec)', '  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code', '    exec(code, run_globals)', '  File "/app/clean_env_py3/lib/python3.6/site-packages/pylint/__main__.py", line 7, in <module>', '    pylint.run_pylint()', '  File "/app/clean_env_py3/lib/python3.6/site-packages/pylint/__init__.py", line 23, in run_pylint', '    PylintRun(sys.argv[1:])', '  File "/app/clean_env_py3/lib/python3.6/site-packages/pylint/lint.py", line 1637, in __init__', '    linter.load_default_plugins()', '  File "/app/clean_env_py3/lib/python3.6/site-packages/pylint/lint.py", line 645, in load_default_plugins', '    checkers.initialize(self)', '  File "/app/clean_env_py3/lib/python3.6/site-packages/pylint/checkers/__init__.py", line 61, in initialize', '    register_plugins(linter, __path__[0])', '  File "/app/clean_env_py3/lib/python3.6/site-packages/pylint/utils/utils.py", line 218, in register_plugins', '    module = modutils.load_module_from_file(join(directory, filename))', '  File "/app/clean_env_py3/lib/python3.6/site-packages/astroid/modutils.py", line 280, in load_module_from_file', '    return load_module_from_modpath(modpath, path, use_sys)', '  File "/app/clean_env_py3/lib/python3.6/site-packages/astroid/modutils.py", line 241, in load_module_from_modpath', '    module = imp.load_module(curname, mp_file, mp_filename, mp_desc)', '  File "/usr/local/lib/python3.6/imp.py", line 235, in load_module', '    return load_source(name, filename, file)', '  File "/usr/local/lib/python3.6/imp.py", line 172, in load_source', '    module = _load(spec)', '  File "<frozen importlib._bootstrap>", line 684, in _load', '  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked', '  File "<frozen importlib._bootstrap_external>", line 678, in exec_module', '  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed', '  File "/app/clean_env_py3/lib/python3.6/site-packages/pylint/checkers/imports.py", line 40, in <module>', '    import isort', '  File "/app/clean_env_py3/lib/python3.6/site-packages/isort/__init__.py", line 25, in <module>', '    from . import settings  # noqa: F401', '  File "/app/clean_env_py3/lib/python3.6/site-packages/isort/settings.py", line 52, in <module>', "    if appdirs.system == 'darwin':", "AttributeError: module 'appdirs' has no attribute 'system'"]

Details:

https://github.com/PyCQA/pylint/blob/pylint-2.4.4/pylint/checkers/imports.py#L40

import isort

https://github.com/timothycrosley/isort/blob/4.3.21/isort/settings.py#L45

try:
    import appdirs
    if appdirs.system == 'darwin':
        appdirs.system = 'linux2'
except ImportError:
    appdirs = None

As appdirs package is not installed, the code is meant to catch an ImportError. Instead, it loads the local appdirs.py, which results in AttributeError: module 'appdirs' has no attribute 'system'" as it is a different module to what it expected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.