Skip to content

Commit bcd59c3

Browse files
committed
Adds more Python pre-commit checks
1 parent 59115d8 commit bcd59c3

5 files changed

+11
-1
lines changed

.pre-commit-config.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,20 @@ repos:
66
hooks:
77
- id: check-added-large-files
88
- id: check-ast
9+
- id: check-builtin-literals
910
- id: check-byte-order-marker
1011
- id: check-case-conflict
1112
- id: check-docstring-first
13+
- id: check-docstring-first
1214
- id: check-executables-have-shebangs
1315
- id: check-json
1416
- id: check-merge-conflict
1517
- id: check-yaml
18+
- id: debug-statements
19+
- id: double-quote-string-fixer
1620
- id: end-of-file-fixer
21+
- id: fix-encoding-pragma
22+
- id: mixed-line-ending
1723
- id: sort-simple-yaml
1824
- id: trailing-whitespace
1925

src/bstruct/bstruct.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import struct
23
import datetime
34
import binascii

src/bstruct/bstruct_defs.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from .bstruct import *
23

34
#

src/fx-data-convert-from-csv.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
23
# Python script to convert Forex files into different formats (e.g. FXT/HST/HCC).
34

45
from struct import pack, pack_into, calcsize
@@ -79,7 +80,7 @@ def string_to_timestamp(s):
7980
class CSV(Input):
8081
def __init__(self, path):
8182
super().__init__(path)
82-
if os.name == "nt":
83+
if os.name == 'nt':
8384
self._map_obj = mmap.mmap(self.path.fileno(), 0, access=mmap.ACCESS_READ)
8485
else:
8586
self._map_obj = mmap.mmap(self.path.fileno(), 0, prot=mmap.PROT_READ)

src/fx-data-convert-to-csv.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
23

34
import argparse
45
import bstruct

0 commit comments

Comments
 (0)