44
44
//| other way around."""
45
45
//|
46
46
47
- //| def uname() -> Any :
47
+ //| def uname() -> tuple :
48
48
//| """Returns a named tuple of operating specific and CircuitPython port
49
49
//| specific information."""
50
50
//| ...
@@ -54,7 +54,7 @@ STATIC mp_obj_t os_uname(void) {
54
54
}
55
55
STATIC MP_DEFINE_CONST_FUN_OBJ_0 (os_uname_obj , os_uname );
56
56
57
- //| def chdir(path: Any ) -> Any :
57
+ //| def chdir(path: string ) -> None :
58
58
//| """Change current directory."""
59
59
//| ...
60
60
//|
@@ -65,7 +65,7 @@ mp_obj_t os_chdir(mp_obj_t path_in) {
65
65
}
66
66
MP_DEFINE_CONST_FUN_OBJ_1 (os_chdir_obj , os_chdir );
67
67
68
- //| def getcwd() -> Any :
68
+ //| def getcwd() -> string :
69
69
//| """Get the current directory."""
70
70
//| ...
71
71
//|
@@ -74,7 +74,7 @@ mp_obj_t os_getcwd(void) {
74
74
}
75
75
MP_DEFINE_CONST_FUN_OBJ_0 (os_getcwd_obj , os_getcwd );
76
76
77
- //| def listdir(dir: Any ) -> Any :
77
+ //| def listdir(dir: string ) -> string :
78
78
//| """With no argument, list the current directory. Otherwise list the given directory."""
79
79
//| ...
80
80
//|
@@ -89,7 +89,7 @@ mp_obj_t os_listdir(size_t n_args, const mp_obj_t *args) {
89
89
}
90
90
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (os_listdir_obj , 0 , 1 , os_listdir );
91
91
92
- //| def mkdir(path: Any ) -> Any :
92
+ //| def mkdir(path: string ) -> None :
93
93
//| """Create a new directory."""
94
94
//| ...
95
95
//|
@@ -100,7 +100,7 @@ mp_obj_t os_mkdir(mp_obj_t path_in) {
100
100
}
101
101
MP_DEFINE_CONST_FUN_OBJ_1 (os_mkdir_obj , os_mkdir );
102
102
103
- //| def remove(path: Any ) -> Any :
103
+ //| def remove(path: string ) -> None :
104
104
//| """Remove a file."""
105
105
//| ...
106
106
//|
@@ -111,7 +111,7 @@ mp_obj_t os_remove(mp_obj_t path_in) {
111
111
}
112
112
MP_DEFINE_CONST_FUN_OBJ_1 (os_remove_obj , os_remove );
113
113
114
- //| def rmdir(path: Any ) -> Any :
114
+ //| def rmdir(path: string ) -> None :
115
115
//| """Remove a directory."""
116
116
//| ...
117
117
//|
@@ -123,7 +123,7 @@ mp_obj_t os_rename(mp_obj_t old_path_in, mp_obj_t new_path_in) {
123
123
}
124
124
MP_DEFINE_CONST_FUN_OBJ_2 (os_rename_obj , os_rename );
125
125
126
- //| def rename(old_path: Any , new_path: Any ) -> Any :
126
+ //| def rename(old_path: string , new_path: string ) -> string :
127
127
//| """Rename a file."""
128
128
//| ...
129
129
//|
@@ -134,7 +134,7 @@ mp_obj_t os_rmdir(mp_obj_t path_in) {
134
134
}
135
135
MP_DEFINE_CONST_FUN_OBJ_1 (os_rmdir_obj , os_rmdir );
136
136
137
- //| def stat(path: Any ) -> Any :
137
+ //| def stat(path: string ) -> string :
138
138
//| """Get the status of a file or directory.
139
139
//|
140
140
//| .. note:: On builds without long integers, the number of seconds
@@ -149,7 +149,7 @@ mp_obj_t os_stat(mp_obj_t path_in) {
149
149
}
150
150
MP_DEFINE_CONST_FUN_OBJ_1 (os_stat_obj , os_stat );
151
151
152
- //| def statvfs(path: Any ) -> Any :
152
+ //| def statvfs(path: string ) -> Tuple[string, string, string, string, string, string, string, string, string, string] :
153
153
//| """Get the status of a fileystem.
154
154
//|
155
155
//| Returns a tuple with the filesystem information in the following order:
@@ -176,7 +176,7 @@ mp_obj_t os_statvfs(mp_obj_t path_in) {
176
176
}
177
177
MP_DEFINE_CONST_FUN_OBJ_1 (os_statvfs_obj , os_statvfs );
178
178
179
- //| def sync() -> Any :
179
+ //| def sync() -> None :
180
180
//| """Sync all filesystems."""
181
181
//| ...
182
182
//|
@@ -189,7 +189,7 @@ STATIC mp_obj_t os_sync(void) {
189
189
}
190
190
MP_DEFINE_CONST_FUN_OBJ_0 (os_sync_obj , os_sync );
191
191
192
- //| def urandom(size: Any ) -> Any :
192
+ //| def urandom(size: int ) -> string :
193
193
//| """Returns a string of *size* random bytes based on a hardware True Random
194
194
//| Number Generator. When not available, it will raise a NotImplementedError."""
195
195
//| ...
0 commit comments