forked from NaiboWang/EasySpider
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NaiboWang#359 from touero/master
Define constants using enumeration classes
- Loading branch information
Showing
2 changed files
with
56 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from enum import unique, IntEnum | ||
|
||
|
||
@unique | ||
class WriteMode(IntEnum): | ||
Create = 0 # 新建模式|Create Mode | ||
Append = 1 # 追加模式|Append Mode | ||
Mysql = 2 # Mysql模式|Mysql Mode | ||
Json = 3 # Json模式|Json Mode | ||
|
||
|
||
@unique | ||
class DataWriteMode(IntEnum): | ||
Append = 1 # 追加模式|Append Mode | ||
Cover = 2 # 覆盖模式|Cover Mode | ||
Rename = 3 # 重命名模式|Rename Mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters