Skip to content

Commit 524193e

Browse files
committed
Fixed linting issues
1 parent e050066 commit 524193e

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

nle_language_wrapper/agents/sample_factory/env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def _tokenize(self, str_obsv):
4444
max_length=self.cfg["max_token_length"],
4545
)
4646
# Sample factory insists on normalizing obs key.
47-
tokens.data["obs"] = torch.tensor(0)
47+
tokens.data["obs"] = torch.zeros(1)
4848
return tokens.data
4949

5050
def _convert_obsv_to_str(self, obsv):

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ known_third_party = ["nle"]
1717

1818
[tool.pylint.messages_control]
1919
max-line-length = 88
20+
generated-members="torch.*"
2021
disable = [
2122
"missing-function-docstring",
2223
"missing-module-docstring",

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def build_extension(self, ext):
6262
"dev": [
6363
"black>=22.6.0",
6464
"flake8>=4.0.1",
65+
"pylint>=2.15.8",
6566
"pytest>=7.1.2",
6667
"pytest-cov>=3.0.0",
6768
"pytest-mock>=3.7.0",
@@ -72,7 +73,8 @@ def build_extension(self, ext):
7273
"agent": [
7374
"sample_factory>=1.121.4",
7475
"transformers>=4.17.0",
75-
"torch@https://download.pytorch.org/whl/cu111/torch-1.9.1%2Bcu111-cp39-cp39-linux_x86_64.whl",
76+
"torch@https://download.pytorch.org/whl/cu111/"
77+
"torch-1.9.1%2Bcu111-cp39-cp39-linux_x86_64.whl",
7678
],
7779
}
7880

0 commit comments

Comments
 (0)