configured linting with pyls

This commit is contained in:
Sumner Evans
2019-07-28 10:57:29 -06:00
parent e08e3cb12c
commit de9472ec9b
5 changed files with 22 additions and 5 deletions

View File

@@ -1,2 +0,0 @@
[flake8]
ignore = E402

3
.vim/settings.json Normal file
View File

@@ -0,0 +1,3 @@
{
"pyls.plugins.pydocstyle.enabled": true
}

View File

@@ -3,7 +3,7 @@ import sys
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
from gi.repository import Gtk # noqa: F401
from .app import LibremsonicApp

View File

@@ -24,6 +24,7 @@ from .albums import AlbumsGrid
class ArtistsPanel(Gtk.Box):
"""Defines the arist panel."""
__gsignals__ = {
'song-clicked': (
GObject.SIGNAL_RUN_FIRST,
@@ -130,8 +131,8 @@ class ArtistsGrid(CoverArtGrid):
return item.name
def get_info_text(self, item) -> str:
return (str(item.album_count) + ' ' +
util.pluralize('album', item.album_count))
return (str(item.album_count) + ' '
+ util.pluralize('album', item.album_count))
def get_model_list_future(self, before_download) -> List[ArtistID3]:
return CacheManager.get_artists(before_download=before_download)
@@ -149,6 +150,7 @@ class ArtistsGrid(CoverArtGrid):
class ArtistList(Gtk.Paned):
"""Defines the artists list."""
__gsignals__ = {
'item-clicked': (
GObject.SIGNAL_RUN_FIRST,
@@ -160,6 +162,7 @@ class ArtistList(Gtk.Paned):
class ArtistDetailPanel(Gtk.Box):
"""Defines the artists list."""
__gsignals__ = {
'song-clicked': (
GObject.SIGNAL_RUN_FIRST,

13
setup.cfg Normal file
View File

@@ -0,0 +1,13 @@
[pycodestyle]
ignore = E402, W503
[pydocstyle]
ignore = D100, D101, D102, D107, D203
[yapf]
based_on_style = pep8
split_before_bitwise_operator = true
split_before_arithmetic_operator = true
split_before_dot = true
split_before_logical_operator = true
split_complex_comprehension = true