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

Commit 8907e10

Browse files
committedApr 6, 2019
Add a linter
1 parent f2868b1 commit 8907e10

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed
 

Diff for: ‎.pre-commit-config.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
repos:
2+
- repo: https://gitlab.com/pycqa/flake8
3+
rev: '3.7.7'
4+
hooks:
5+
- id: flake8
6+
additional_dependencies: [flake8-docstrings, pep8-naming, flake8-import-order]
7+
8+

Diff for: ‎docs/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,18 @@ Blog and management platform for PSF for running GSoC
55
## Installation
66

77
Requires python 3.6+
8+
To install development dependncies:-
89

910
```bash
1011
pip install -r requirements.txt
1112
```
13+
To install pre-commit package manager for linting support using pip:-
1214

15+
$ pip install pre-commit
16+
17+
or
18+
Run $pre-commit install to install pre-commit into your git hooks.
19+
pre-commit will now run on every commit. Every time you clone a project using pre-commit running pre-commit install should always be the first thing you do.
1320
## Usage
1421

1522
```python
@@ -54,6 +61,11 @@ You can create a virtualenv using the following command:
5461
$ virtualenv my_name
5562

5663
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.
64+
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:-
65+
66+
$ source virtualenv_name/bin/activate
67+
68+
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.
5769
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.
5870

5971
(virtualenv_name)$ pip install Django==1.9

Diff for: ‎tox.ini

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[flake8]
2+
max-line-length = 110
3+
exclude =
4+
# No need to traverse our git directory
5+
.git,
6+
#Contains mostly auto generated files
7+
*/migrations/*,
8+
*/static/CACHE/*,
9+
#Contains documentation for the project
10+
docs
11+
count = True
12+
format=pylint
13+
hang-closing = True
14+
show-source = True
15+
statistics = True
16+
output-file = output.txt
17+
tee = True
18+
#Enable PyFlakes syntax checking of doctests in docstrings
19+
doctests = True
20+

0 commit comments

Comments
 (0)
This repository has been archived.