Skip to content

Commit

Permalink
enable pyre-strict lint rule in test_update_generic_hook.py (#2389)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #2389

enable pyre-strict lint rule and silence the type errors that arise from doing so

Reviewed By: joe1234wu

Differential Revision: D53432969

fbshipit-source-id: a419d9632b2fc171d91dba2d5909fca796429e2c
  • Loading branch information
migeed-z authored and facebook-github-bot committed Feb 5, 2024
1 parent 0606987 commit b79df09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fbpcs/common/tests/entity/test_update_generic_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyer-strict
# pyre-strict

import unittest
from dataclasses import dataclass, field
Expand All @@ -14,13 +14,15 @@
from fbpcs.common.entity.update_generic_hook import UpdateGenericHook


# pyre-fixme[3]: Return type must be annotated.
def after_update_input(obj: "DummyInstance"):
obj.output_path = obj.input_path + ":output"
obj.storage = obj.input_path + ":storage"


# create a hook obj
# update output_path and storage in one hook when input_path is changed
# pyre-fixme[24]: Generic type `UpdateGenericHook` expects 1 type parameter.
input_updated_hook: UpdateGenericHook = UpdateGenericHook(after_update_input)


Expand Down

0 comments on commit b79df09

Please sign in to comment.