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

Make pyfakefs API PEP-8 conform #186

Closed
8 tasks done
mrbean-bremen opened this issue May 22, 2017 · 1 comment
Closed
8 tasks done

Make pyfakefs API PEP-8 conform #186

mrbean-bremen opened this issue May 22, 2017 · 1 comment

Comments

@mrbean-bremen
Copy link
Member

mrbean-bremen commented May 22, 2017

As discussed, it makes sense to have a PEP-8 conform API for pyfakefs. The coding conventions that are currently used have been introduced by Google, but Google has changed its coding guidelines to be conform to PEP-8 since.

I propose to start this after the next release (e.g. after 3.2).
There are a few points that are related to this, which I would like to discuss:

  • replace the 'official' API with the new one
  • mimic the Python API where appropriate (e.g. MakeDirectory -> makedir)
  • let the old API issue a deprecation warning on usage; I propose to switch this off by default, so it can be switched on only if wanted, and switch it on by default in a later version
  • greatly reduce number of public functions; there are a lot of functions that are only needed internally (I added a number of them myself) and shall not be documented by autodoc
  • deprecate unneeded functions (example: SetMTime(), as there is already the property st_mtime)

Somewhat related are some further PEP-8 adaptations:

  • adapt line length to PEP-8 (or define another line length in .pylintrc as currently done)
  • adapt the test naming to PEP-8
  • fix pylint warnings, or switch them off where it makes sense
    (some of this can be done by autopep8 or similar tools)
  • configure landscape.io (I did this some time ago in my fork) - skipping this one

For documentation, we want to follow the Google coding guidelines.

mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue May 27, 2017
- changed methods names
- added old method names as depracated version
- added possibility to switch on deprecation warning
- see pytest-dev#186
@mrbean-bremen mrbean-bremen modified the milestone: v3.4 Jul 9, 2017
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Aug 14, 2017
- changed methods names
- added old method names as depracated version
- added possibility to switch on deprecation warning
- see pytest-dev#186
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Aug 24, 2017
- changed methods names
- added old method names as depracated version
- added possibility to switch on deprecation warning
- see pytest-dev#186
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Nov 22, 2017
- changed methods names
- added old method names as depracated version
- added possibility to switch on deprecation warning
- see pytest-dev#186
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Nov 22, 2017
- changed methods names
- added old method names as depracated version
- added possibility to switch on deprecation warning
- see pytest-dev#186
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Dec 4, 2017
- changed methods names
- added old method names as depracated version
- added possibility to switch on deprecation warning
- see pytest-dev#186
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Dec 4, 2017
- changed methods names
- added old method names as depracated version
- added possibility to switch on deprecation warning
- see pytest-dev#186
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Dec 5, 2017
- changed methods names
- added old method names as depracated version
- added possibility to switch on deprecation warning
- see pytest-dev#186
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Dec 13, 2017
- changed methods names
- added old method names as depracated version
- added possibility to switch on deprecation warning
- see pytest-dev#186
mrbean-bremen added a commit that referenced this issue Dec 17, 2017
- changed methods names
- added old method names as depracated version
- added possibility to switch on deprecation warning
- see #186
mrbean-bremen added a commit that referenced this issue Dec 17, 2017
- some PEP-8 reformatting
- see #186
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Dec 18, 2017
- adapted method names
- adapted some formatting
- see pytest-dev#186
@mrbean-bremen
Copy link
Member Author

Implemented.

oliverchang added a commit to google/clusterfuzz that referenced this issue Jul 31, 2019
Functions were renamed to be pep-8 conformant:
pytest-dev/pyfakefs#186
oliverchang added a commit to google/clusterfuzz that referenced this issue Jul 31, 2019
Functions were renamed to be pep-8 conformant:
pytest-dev/pyfakefs#186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant