Skip to content

Commit

Permalink
Syncs two repos
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Mar 20, 2018
1 parent 89df677 commit 32b9109
Show file tree
Hide file tree
Showing 32 changed files with 899 additions and 17 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Check http://editorconfig.org for more information
# This is the main config file for this project:
root = true

[*]
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_style = space
insert_final_newline = true
indent_size = 2

[*.py]
indent_size = 4
102 changes: 98 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#### joe made this: http://goel.io/joe
#### python ####
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -8,7 +10,6 @@ __pycache__/

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
Expand Down Expand Up @@ -79,11 +80,10 @@ celerybeat-schedule
# SageMath parsed files
*.sage.py

# dotenv
# Environments
.env

# virtualenv
.venv
env/
venv/
ENV/

Expand All @@ -99,3 +99,97 @@ ENV/

# mypy
.mypy_cache/
#### macos ####
# General
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
#### windows ####
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
#### linux ####
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*
#### jetbrains ####
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
Empty file added CHANGELOG.rst
Empty file.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
recursive-include wemake-python-styleguide *.py
include LICENSE README.rst
19 changes: 19 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[[source]]

url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"


[packages]



[dev-packages]

pytest = "*"


[requires]

python_version = "3.6"
72 changes: 72 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions README.md

This file was deleted.

15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
wemake-python-styleguide
------------------------

Welcome to the most opinionated linter ever.


Project status
==============

Right now we are collecting all the things we dislike in `python` and `django` to forbid them forever.
Do you want to contribute? Feel free to submit:

1. `python issues <https://github.com/wemake-services/wemake-python-styleguide/issues/1>`_
2. `code smells <https://github.com/wemake-services/wemake-python-styleguide/issues/2>`_
3. `django issues <https://github.com/wemake-services/wemake-python-styleguide/issues/4>`_
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal = 1
73 changes: 73 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Note: To use the 'upload' functionality of this file, you must:
# $ pip install twine

import io
import os

from setuptools import setup

# Package meta-data.
NAME = 'wemake-python-styleguide'
DESCRIPTION = 'Warns about redundant arguments'
URL = 'https://github.com/wemake-services/wemake-python-styleguide'
EMAIL = '[email protected]'
AUTHOR = 'Nikita Sobolev'

REQUIRED = [
'flake8',
]

here = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = '\n' + f.read()


setup(
name=NAME,
version='0.0.1',
description=DESCRIPTION,
long_description=long_description,
author=AUTHOR,
author_email=EMAIL,
url=URL,
py_modules=['flake8_arguments'],
keywords=[
'flake8',
'plugin',
'arguments',
'functions',
'methods',
],
install_requires=REQUIRED,
include_package_data=True,
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Framework :: Flake8',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',

'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',

'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Quality Assurance',
],

entry_points={
'flake8.extension': [
'WPS10 = wemake_python_styleguide:WrongKeywordChecker',
'WPS11 = wemake_python_styleguide:WrongFunctionCallChecker',
'WPS12 = wemake_python_styleguide:WrongVariableChecker',
'WPS13 = wemake_python_styleguide:WrongImportChecker',
],
},
zip_safe=False,
)
17 changes: 17 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-

import ast
import os

import pytest
from flake8.processor import FileProcessor


@pytest.fixture(scope='session')
def absolute_path():
dirname = os.path.dirname(__file__)

def make_absolute_path(*files):
return os.path.join(dirname, *files)

return make_absolute_path
17 changes: 17 additions & 0 deletions tests/fixtures/wrong_function_call.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-

"""
This file contains all prohibited function calls.
"""

x = input('Input x:')

eval('x / 1')
exec('')
compile('')

z = globals()
y = locals()

vars(z)
dir(y)
Loading

0 comments on commit 32b9109

Please sign in to comment.