gatesn: @lgeiger hopefully last iteration on this stuff!
lgeiger: Thanks for taking a look and maintaining this language server!

Unfortunately it looks like this doesn't fully fix the problem. I rebased #211 onto this branch and  the bug is still partially present. I hope I'm missing something obvious here 😄 
gatesn: Will merge this as it seems to resolve #210, then will look again at your rebased branch. Thanks for testing.
diff --git a/pyls/language_server.py b/pyls/language_server.py
index b898ae1..f310182 100644
--- a/pyls/language_server.py
+++ b/pyls/language_server.py
@@ -65,7 +65,7 @@ class LanguageServer(dispatcher.JSONRPCMethodDispatcher, JSONRPCServer):
         pass
 
     def m_initialize(self, **kwargs):
-        log.debug("Language server intialized with %s", kwargs)
+        log.debug("Language server initialized with %s", kwargs)
         if 'rootUri' in kwargs:
             self.root_uri = kwargs['rootUri']
         elif 'rootPath' in kwargs:
diff --git a/pyls/plugins/pycodestyle_lint.py b/pyls/plugins/pycodestyle_lint.py
index d157a38..2940166 100644
--- a/pyls/plugins/pycodestyle_lint.py
+++ b/pyls/plugins/pycodestyle_lint.py
@@ -12,12 +12,12 @@ def pyls_lint(config, document):
     log.debug("Got pycodestyle settings: %s", settings)
 
     opts = {
-        'exclude': settings.get('exclude'),
-        'filename': settings.get('filename'),
+        'exclude': ','.join(settings.get('exclude') or []),
+        'filename': ','.join(settings.get('filename') or []),
         'hang_closing': settings.get('hangClosing'),
-        'ignore': settings.get('ignore'),
+        'ignore': ','.join(settings.get('ignore') or []),
         'max_line_length': settings.get('maxLineLength'),
-        'select': settings.get('select'),
+        'select': ','.join(settings.get('select') or []),
     }
 
     styleguide = pycodestyle.StyleGuide({k: v for k, v in opts.items() if v is not None})
@@ -27,6 +27,7 @@ def pyls_lint(config, document):
     )
     c.check_all()
     diagnostics = c.report.diagnostics
+
     return diagnostics
 
 

pycodestyle config not being read, seeing runtime errors since 0.12.0
Since upgrading to 0.12.1 (from 0.11.1) I noticed that I was getting D100 and D103 docstring warnings in my code, even though I ignored them via `$HOME/.config/pycodestyle`.  I tried adding a `setup.cfg` to the project directory but I still got the warnings.

When running `pyls` (as `pyls --tcp --port 9001 -v`) in TCP mode I saw the following output after loading a Python file. Could the issue I'm seeing be related to the pydocstyle error? 


```
[...]
2017-12-25 11:09:59,221 UTC - INFO - pyls.config.config - Loaded pyls plugin pycodestyle from <module 'pyls.plugins.pycodestyle_lint' from '/home/terr/.local/lib/python3.5/site-packages/pyls/plugins/pycodestyle_lint.py'>
[...]
2017-12-25 11:04:15,188 UTC - INFO - pyls.config.config - Loaded pyls plugin mccabe from <module 'pyls.plugins.mccabe_lint' from '/home/terr/.local/lib/python3.5/site-packages/pyls/plugins/mccabe_lint.py'>
2017-12-25 11:04:15,188 UTC - INFO - pyls.config.config - Loaded pyls plugin jedi_signature_help from <module 'pyls.plugins.signature' from '/home/terr/.local/lib/python3.5/site-packages/pyls/plugins/signature.py'>
Usage: pydocstyle [options] [<file|dir>...]
pyls: error: no such option: --tcp
```

I'm assuming the "no such option: --tcp" error doesn't occur in IO mode. I've got the most recent version of `pydocstyle` installed, 2.1.1. 

I also tried 0.12.0, where I got the same output and results (warnings about D100/D103). Version 0.11.1 still works fine, both in IO and TCP mode.
diff --git a/test/plugins/test_pycodestyle_lint.py b/test/plugins/test_pycodestyle_lint.py
index a93b513..028997f 100644
--- a/test/plugins/test_pycodestyle_lint.py
+++ b/test/plugins/test_pycodestyle_lint.py
@@ -86,4 +86,9 @@ def test_pycodestyle_config(workspace):
     # And make sure we only get one warning
     diags = pycodestyle_lint.pyls_lint(config, doc)
     assert not [d for d in diags if d['code'] == 'W191']
-    assert [d for d in diags if d['code'] == 'W391']
+
+    # Ignore both warnings
+    config.update({'plugins': {'pycodestyle': {'ignore': ['W191', 'W391']}}})
+    # And make sure we get neither
+    assert not [d for d in diags if d['code'] == 'W191']
+    assert not [d for d in diags if d['code'] == 'W391']

pip install -e .[test]
parse_log_pytest
requirements.txt
pytest pytest-cov
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
cachetools==5.5.2
chardet==5.2.0
colorama==0.4.6
configparser==7.2.0
coverage==7.8.0
distlib==0.3.9
exceptiongroup==1.2.2
filelock==3.18.0
future==1.0.0
iniconfig==2.1.0
jedi==0.19.2
json-rpc==1.15.0
mccabe==0.7.0
packaging==24.2
parso==0.8.4
platformdirs==4.3.7
pluggy==1.5.0
pycodestyle==2.13.0
pydocstyle==6.3.0
pyflakes==3.3.1
pyproject-api==1.9.0
pytest==8.3.5
pytest-cov==6.0.0
-e git+https://github.com/palantir/python-language-server.git@85907d6f7af5aaf1d6fd13c543327319b0c02282#egg=python_language_server
pytoolconfig==1.3.1
rope==1.13.0
snowballstemmer==2.2.0
tomli==2.2.1
tox==4.25.0
typing_extensions==4.13.0
versioneer==0.29
virtualenv==20.29.3
yapf==0.43.0

name: python-language-server
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - cachetools==5.5.2
      - chardet==5.2.0
      - colorama==0.4.6
      - configparser==7.2.0
      - coverage==7.8.0
      - distlib==0.3.9
      - exceptiongroup==1.2.2
      - filelock==3.18.0
      - future==1.0.0
      - iniconfig==2.1.0
      - jedi==0.19.2
      - json-rpc==1.15.0
      - mccabe==0.7.0
      - packaging==24.2
      - parso==0.8.4
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pydocstyle==6.3.0
      - pyflakes==3.3.1
      - pyproject-api==1.9.0
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - pytoolconfig==1.3.1
      - rope==1.13.0
      - snowballstemmer==2.2.0
      - tomli==2.2.1
      - tox==4.25.0
      - typing-extensions==4.13.0
      - versioneer==0.29
      - virtualenv==20.29.3
      - yapf==0.43.0
prefix: /opt/conda/envs/python-language-server

test/plugins/test_pycodestyle_lint.py::test_pycodestyle_config
test/plugins/test_pycodestyle_lint.py::test_pycodestyle
pyls/language_server.py pyls/plugins/pycodestyle_lint.py
pyls/language_server.py pyls/plugins/pycodestyle_lint.py