Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Add a linter #105

Merged
merged 2 commits into from
Apr 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: https://gitlab.com/pycqa/flake8
rev: '3.7.7'
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings, pep8-naming, flake8-import-order]


7 changes: 6 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Blog and management platform for PSF for running GSoC
## Installation

Requires python 3.6+
To install development dependncies:-

```bash
pip install -r requirements.txt
```

## Usage

```python
Expand Down Expand Up @@ -54,6 +54,11 @@ You can create a virtualenv using the following command:
$ virtualenv my_name

After running this command, a directory named my_name will be created. This is the directory which contains all the necessary executables to use the packages that a Python project would need. This is where Python packages will be installed.
Now after creating virtual environment, you need to activate it. Remember to activate the relevant virtual environment every time you work on the project. This can be done using the following command:-

$ source virtualenv_name/bin/activate

Once the virtual environment is activated, the name of your virtual environment will appear on left side of terminal. This will let you know that the virtual environment is currently active.
Now you can install dependencies related to the project in this virtual environment. For example if you are using Django 1.9 for a project, you can install it like you install other packages.

(virtualenv_name)$ pip install Django==1.9
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ fredirc==0.3.0
pdfminer.six==20181108
chardet==3.0.4
phonenumbers==8.10.6
pre-commit>=1.14.4
20 changes: 20 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[flake8]
max-line-length = 110
exclude =
# No need to traverse our git directory
.git,
#Contains mostly auto generated files
*/migrations/*,
*/static/CACHE/*,
#Contains documentation for the project
docs
count = True
format=pylint
hang-closing = True
show-source = True
statistics = True
output-file = output.txt
tee = True
#Enable PyFlakes syntax checking of doctests in docstrings
doctests = True