Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
ce124e5e
Commit
ce124e5e
authored
Nov 5, 2015
by
labrys
Browse files
Options
Downloads
Patches
Plain Diff
Add comments for existing pylint codes
parent
cf725bad
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
SickBeard.py
+11
-0
11 additions, 0 deletions
SickBeard.py
with
11 additions
and
0 deletions
SickBeard.py
+
11
−
0
View file @
ce124e5e
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
# Check needed software dependencies to nudge users to fix their setup
# Check needed software dependencies to nudge users to fix their setup
# pylint: disable=W0703
# pylint: disable=W0703
# Catching too general exception
from
__future__
import
with_statement
from
__future__
import
with_statement
...
@@ -49,6 +50,7 @@ if sys.version_info < (2, 7):
...
@@ -49,6 +50,7 @@ if sys.version_info < (2, 7):
if
sys
.
version_info
>=
(
2
,
7
,
9
):
if
sys
.
version_info
>=
(
2
,
7
,
9
):
import
ssl
import
ssl
# pylint: disable=W0212
# pylint: disable=W0212
# Access to a protected member of a client class
ssl
.
_create_default_https_context
=
ssl
.
_create_unverified_context
ssl
.
_create_default_https_context
=
ssl
.
_create_unverified_context
import
locale
import
locale
...
@@ -72,6 +74,7 @@ signal.signal(signal.SIGTERM, sickbeard.sig_handler)
...
@@ -72,6 +74,7 @@ signal.signal(signal.SIGTERM, sickbeard.sig_handler)
class
SickRage
(
object
):
class
SickRage
(
object
):
# pylint: disable=R0902
# pylint: disable=R0902
# Too many instance attributes
def
__init__
(
self
):
def
__init__
(
self
):
# system event callback for shutdown/restart
# system event callback for shutdown/restart
sickbeard
.
events
=
Events
(
self
.
shutdown
)
sickbeard
.
events
=
Events
(
self
.
shutdown
)
...
@@ -153,6 +156,8 @@ class SickRage(object):
...
@@ -153,6 +156,8 @@ class SickRage(object):
pass
pass
# pylint: disable=R0912,R0915
# pylint: disable=R0912,R0915
# Too many branches
# Too many statements
def
start
(
self
):
def
start
(
self
):
# do some preliminary stuff
# do some preliminary stuff
sickbeard
.
MY_FULLNAME
=
os
.
path
.
normpath
(
os
.
path
.
abspath
(
__file__
))
sickbeard
.
MY_FULLNAME
=
os
.
path
.
normpath
(
os
.
path
.
abspath
(
__file__
))
...
@@ -177,11 +182,13 @@ class SickRage(object):
...
@@ -177,11 +182,13 @@ class SickRage(object):
if
sys
.
platform
==
'
win32
'
:
if
sys
.
platform
==
'
win32
'
:
# pylint: disable=E1101
# pylint: disable=E1101
# An object is accessed for a non-existent member.
if
sys
.
getwindowsversion
()[
0
]
>=
6
and
sys
.
stdout
.
encoding
==
'
cp65001
'
:
if
sys
.
getwindowsversion
()[
0
]
>=
6
and
sys
.
stdout
.
encoding
==
'
cp65001
'
:
sickbeard
.
SYS_ENCODING
=
'
UTF-8
'
sickbeard
.
SYS_ENCODING
=
'
UTF-8
'
try
:
try
:
# pylint: disable=E1101
# pylint: disable=E1101
# An object is accessed for a non-existent member.
# On non-unicode builds this will raise an AttributeError, if encoding type is not valid it throws a LookupError
# On non-unicode builds this will raise an AttributeError, if encoding type is not valid it throws a LookupError
sys
.
setdefaultencoding
(
sickbeard
.
SYS_ENCODING
)
sys
.
setdefaultencoding
(
sickbeard
.
SYS_ENCODING
)
except
Exception
:
except
Exception
:
...
@@ -196,6 +203,7 @@ class SickRage(object):
...
@@ -196,6 +203,7 @@ class SickRage(object):
try
:
try
:
# pylint: disable=W0612
# pylint: disable=W0612
# Unused variable
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
"
hqdp::
"
,
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
"
hqdp::
"
,
[
'
help
'
,
'
quiet
'
,
'
nolaunch
'
,
'
daemon
'
,
'
pidfile=
'
,
'
port=
'
,
[
'
help
'
,
'
quiet
'
,
'
nolaunch
'
,
'
daemon
'
,
'
pidfile=
'
,
'
port=
'
,
'
datadir=
'
,
'
config=
'
,
'
noresize
'
])
# @UnusedVariable
'
datadir=
'
,
'
config=
'
,
'
noresize
'
])
# @UnusedVariable
...
@@ -405,6 +413,8 @@ class SickRage(object):
...
@@ -405,6 +413,8 @@ class SickRage(object):
Fork off as a daemon
Fork off as a daemon
"""
"""
# pylint: disable=E1101,W0212
# pylint: disable=E1101,W0212
# An object is accessed for a non-existent member.
# Access to a protected member of a client class
# Make a non-session-leader child process
# Make a non-session-leader child process
try
:
try
:
pid
=
os
.
fork
()
# @UndefinedVariable - only available in UNIX
pid
=
os
.
fork
()
# @UndefinedVariable - only available in UNIX
...
@@ -547,6 +557,7 @@ class SickRage(object):
...
@@ -547,6 +557,7 @@ class SickRage(object):
# system exit
# system exit
logger
.
shutdown
()
# Make sure the logger has stopped, just in case
logger
.
shutdown
()
# Make sure the logger has stopped, just in case
# pylint: disable=W0212
# pylint: disable=W0212
# Access to a protected member of a client class
os
.
_exit
(
0
)
os
.
_exit
(
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment