Skip to content

Commit

Permalink
Merge pull request #102 from gnikit/gnikit/issue101
Browse files Browse the repository at this point in the history
Coverage report PR failure
  • Loading branch information
gnikit authored May 2, 2022
2 parents 6f8741e + 25a3d86 commit d7f4ba0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# CHANGELONG
# CHANGELOG

## 2.3.1

### Fixed

- Fixed remote coverage report line diff
([#101](https://github.com/gnikit/fortls/issues/101))

## 2.3.0

Expand Down
6 changes: 3 additions & 3 deletions fortls/langserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def __init__(self, conn, settings: dict):
self.workspace: dict[str, fortran_file] = {}
self.obj_tree: dict = {}
self.link_version = 0
self._version = version.parse(__version__)
# Parse a dictionary of the command line interface and make them into
# class variable. This way the command line and the file interfaces
# are always on sync, with the same default arguments
Expand Down Expand Up @@ -1719,9 +1720,8 @@ def _update_version_pypi(self, test: bool = False):
"""
if self.disable_autoupdate:
return False
v = version.parse(__version__)
# Do not run for prerelease and dev release
if v.is_prerelease and not test:
if self._version.is_prerelease and not test:
return False
try:
# For security reasons register as Request before opening
Expand All @@ -1733,7 +1733,7 @@ def _update_version_pypi(self, test: bool = False):
if remote_v.is_prerelease:
return False
# This is the only reliable way to compare version semantics
if remote_v > v or test:
if remote_v > self._version or test:
self.post_message(
"A newer version of fortls is available for download",
Severity.info,
Expand Down
2 changes: 2 additions & 0 deletions test/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def test_config_file_codeactions_options():
def test_version_update_pypi():
from fortls.jsonrpc import JSONRPC2Connection, ReadWriter
from fortls.langserver import LangServer
from packaging import version

parser = commandline_args("fortls")
args = parser.parse_args("-c f90_config.json".split())
Expand All @@ -186,5 +187,6 @@ def test_version_update_pypi():
assert not did_update

s.disable_autoupdate = False
s._version = version.parse("999.0.0")
did_update = s._update_version_pypi()
assert not did_update

0 comments on commit d7f4ba0

Please sign in to comment.