Skip to content

Commit

Permalink
Add editorconfig, gitattributes, and flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmazzola committed Mar 3, 2024
1 parent 8edab4e commit c9fea23
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# 4 space indentation
[*.{py,json}]
indent_style = space
indent_size = 4

# 2 space indentation
[*.{md,sh,yaml,yml}]
indent_style = space
indent_size = 2
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
# Flake8 Options: https://flake8.pycqa.org/en/latest/user/options.html#index-of-options
max-line-length = 120
ignore = F541, E501, F841, E203
29 changes: 29 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# https://git-scm.com/docs/gitattributes

# Set the default behavior, in case people don't have core.autocrlf set.
# https://git-scm.com/docs/gitattributes#_end_of_line_conversion
* text=auto

# common python attributes, taken from https://github.com/alexkaratarakis/gitattributes/blob/710900479a2bedeec7003d381719521ffbb18bf8/Python.gitattributes
# Source files
# ============
*.pxd text diff=python
*.py text diff=python
*.py3 text diff=python
*.pyw text diff=python
*.pyx text diff=python
*.pyz text diff=python
*.pyi text diff=python

# Binary files
# ============
*.db binary
*.p binary
*.pkl binary
*.pickle binary
*.pyc binary export-ignore
*.pyo binary export-ignore
*.pyd binary

# Jupyter notebook
*.ipynb text eol=lf

0 comments on commit c9fea23

Please sign in to comment.