Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor so that flake passes #88

Open
wants to merge 3 commits into
base: sty-enable-flake8-checks
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ exclude =
docs/source/conf.py
max-line-length = 115
# Ignore some style 'errors' produced while formatting by 'black'
ignore = E203, W503
ignore = E203, E402, E501, E712, E741, F402, F632, F811, F821, F823, F841, W503, W605
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
# !/usr/bin/env python3
# -*- coding: utf-8 -*-
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this exact shebang line should be changed. # and ! have to go together without a blank space in between.

https://en.wikipedia.org/wiki/Shebang_(Unix)

#
# pyCHX documentation build configuration file, created by
Expand Down Expand Up @@ -159,7 +159,7 @@

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(
master_doc,
Expand Down Expand Up @@ -190,7 +190,7 @@

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
# dir menu entry, description, category)
texinfo_documents = [
(
master_doc,
Expand Down
4 changes: 2 additions & 2 deletions pyCHX/Badpixels.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@
4155535,
]
), # 57 points, coralpor
"6cc34a": np.array([1058942, 2105743, 2105744, 2107813, 2107815, 2109883, 4155535]), # coralpor
"6cc34a": np.array([1058942, 2105743, 2105744, 2107813, 2107815, 2109883, 4155535]), # coralpor
}


## Create during 2018 Cycle 1
# Create during 2018 Cycle 1
BadPix_4M = np.array(
[
828861,
Expand Down
6 changes: 3 additions & 3 deletions pyCHX/Compress_readerNew.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,20 @@ def __init__(self, filename, mode="rb", nbytes=2):

def rdframe(self, n):
# read header then image
hdr = self._read_header(n)
self._read_header(n)
pos, vals = self._read_raw(n)
img = np.zeros((self._rows * self._cols,))
img[pos] = vals
return img.reshape((self._rows, self._cols))

def rdrawframe(self, n):
# read header then image
hdr = self._read_header(n)
self._read_header(n)
return self._read_raw(n)

def rdchunk(self):
"""read the next chunk"""
header = self._fd.read(1024)
self._fd.read(1024)

def index(self):
"""Index the file by reading all frame_indexes.
Expand Down
Loading
Loading